package cz.muni.fi.pa165.ddtroops.entities;

import java.io.Serializable;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;

/**
 *  Race class represents a race of a hero in D&D like games. Race has specific
 * bonuses and sanctions applied to Hero's properties.
 * @author Jan Šťastný
 */

@Entity
public class Race implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.AUTO)
    private Long id;
    private String name;
    private String description;
    private Byte strength;
    private Byte dexterity;
    private Byte constitution;
    private Byte intelligence;
    private Byte wisdom;
    private Byte charisma;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (id != null ? id.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        if (!(object instanceof Race)) {
            return false;
        }
        Race other = (Race) object;
        if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "cz.muni.fi.pa165.ddtroops.Race[ id=" + id + " ]";
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public Byte getStrength() {
        return strength;
    }

    public void setStrength(Byte strength) {
        this.strength = strength;
    }

    public Byte getDexterity() {
        return dexterity;
    }

    public void setDexterity(Byte dexterity) {
        this.dexterity = dexterity;
    }

    public Byte getConstitution() {
        return constitution;
    }

    public void setConstitution(Byte constitution) {
        this.constitution = constitution;
    }

    public Byte getIntelligence() {
        return intelligence;
    }

    public void setIntelligence(Byte intelligence) {
        this.intelligence = intelligence;
    }

    public Byte getWisdom() {
        return wisdom;
    }

    public void setWisdom(Byte wisdom) {
        this.wisdom = wisdom;
    }

    public Byte getCharisma() {
        return charisma;
    }

    public void setCharisma(Byte charisma) {
        this.charisma = charisma;
    }



}
